package com.tsu.mall.common.entity;

import java.math.BigDecimal;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 *
 * @author tttttt
 * @since 2023-03-17
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("wares")
public class Wares implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 商品名称
     */
    private String waresName;

    /**
     * 商品价格
     */
    private BigDecimal price;

    /**
     * 特色
     */
    private String feature;

    /**
     * 首页图
     */
    private String mainPic;

    /**
     * 状态（默认0下架，1上架）
     */
    private String status;

    /**
     * 商品分类ID
     */
    private Integer waresclassifyId;


    @TableField(exist = false)
    private Integer topWares;


    @TableField(exist = false)
    private String classifyInfo;//展示分类信息

    @TableField(exist = false)
    private String firstName;//一级分类

    @TableField(exist = false)
    private String secondName;//二级分类

    @TableField(exist = false)
    private Integer secondSelect;//二级分类

    private BigDecimal PrePrice;//原价

    private String unit;//商品单位

    private Integer store;//商品库存

    private Integer starNumber;//商品星级

    private String color;//商品颜色

    private String version;//商品版本

    private String size;//商品尺码

    private String supply;//商品供应商

    private String waresType;//商品类型 T恤，智能设配等...

    private String labels;//商品标签，春夏，秋冬，，，

    private String description;//商品描述

    private String addInfo;//记录商品的一些额外信息

    private String breaks;//记录商品的优惠力度

    private String deliveryType;//支持的快递

    private String barCode;//条形码
    @TableField(exist = false)
    private Integer topWaresNum;//记录商品排名


    public String getClassifyInfo() {
        return firstName+"-"+secondName;
    }
}
